package org.urchr.beorganized.dao.tables;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="stars")
public class Star implements Serializable {

	private static final long serialVersionUID = 2540532633205937158L;
	private int id;
	private Note note;
	private User user;
	
	public void setId(int id) {
		this.id = id;
	}
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return id;
	}

	public void setNote(Note note) {
		this.note = note;
	}

	@ManyToOne
	@JoinColumn(name="id_note")
	public Note getNote() {
		return note;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne
	@JoinColumn(name="id_user")
	public User getUser() {
		return user;
	}
}
